1 /* Generated By:JJTree: Do not edit this line. JavaMethodDeclaration.java */
2
3 package net.sourceforge.jane.jjtree;
4
5 public class JavaMethodDeclaration extends SimpleNode
6 implements JavaParserConstants {
7
8 private Modifiers modifiers;
9 private Token startToken;
10
11 public JavaMethodDeclaration(int id) {
12 super(id);
13 }
14
15 public JavaMethodDeclaration(JavaParser p, int id) {
16 super(p, id);
17 }
18
19 public void jjtOpen() {
20 startToken = parser.getToken(0);
21 }
22
23 public void jjtClose() {
24 modifiers = Modifiers.newInstance(startToken, parser.getToken(0));
25 startToken = null;
26 }
27
28 /*** Accept the visitor. **/
29 public Object jjtAccept(JavaParserVisitor visitor, Object data) {
30 return visitor.visit(this, data);
31 }
32
33 /***
34 * Returns the method name.
35 */
36 public String getMethodName() {
37 return ((JavaMethodDeclarator) JJTreeUtils
38 .findFirstChild(this, JavaMethodDeclarator.class)).getMethodName();
39 }
40
41 /***
42 * Returns the modifiers.
43 */
44 public Modifiers getModifiers() {
45 return modifiers;
46 }
47
48 /***
49 * Returns the result type.
50 */
51 public String getResultType() {
52 return ((JavaResultType) JJTreeUtils
53 .findFirstChild(this, JavaResultType.class)).getValue();
54 }
55
56 /***
57 * Returns the list of exceptions.
58 */
59 public String[] getExceptions() {
60 return JJTreeUtils.getNameListArray(this);
61 }
62
63 }
This page was automatically generated by Maven